package cs575.wido.model;

import cs575.client.Task;
import cs575.wido.TaskListFactory;
import cs575.wido.UserSession;
import cs575.wido.WebServiceFactory;
import java.util.List;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.DefaultTableModel;

public abstract class TaskModel extends AbstractTableModel {
	private final String[] columnNames = {"Name", "Description", "Status", "Due Date"};
	protected List<Task> tasks;
	
	protected cs575.client.WiDo wido;
	protected UserSession userSession;

	public TaskModel() {
		this.wido = WebServiceFactory.getPort();
		this.userSession = UserSession.getInstance();
	}
	
	@Override
	public int getColumnCount() {
		return this.columnNames.length;
	}
	
	public String getColumnName(int column) {
		return columnNames[column];
	}
	
	public Task getTask(int index) {
		return tasks.get(index);
	}
}
